//package com.ruoyi.business.config;
//
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.CorsRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//
///**
// * @author nxh
// * @since 2024/1/16
// * 跨域请求配置
// */
//
////@Configuration
////public class WebConfig implements WebMvcConfigurer {
////
////    @Override
////    public void addCorsMappings(CorsRegistry registry) {
////        registry.addMapping("/**")
////                .allowedOrigins("http://localhost:8080")
////                .allowedMethods("GET", "POST", "PUT", "DELETE")
////                .allowedHeaders("*");
////    }
////}
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.CorsRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//
//@Configuration
//public class WebConfig implements WebMvcConfigurer {
//
//    @Override
//    public void addCorsMappings(CorsRegistry registry) {
//        registry.addMapping("/**")
//                .allowedOrigins("*") // 允许所有域的跨域请求
//                .allowedMethods("*") // 允许所有的请求方法
//                .allowedHeaders("*") // 允许所有的请求头
//                .allowCredentials(true); // 允许发送凭据，例如Cookie
//    }
//}